home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / WAIS / lib / alphasort.c next >
Encoding:
C/C++ Source or Header  |  1992-02-02  |  411 b   |  20 lines

  1. /*
  2. **  ALPHASORT
  3. **  Trivial sorting predicate for scandir; puts entries in alphabetical order.
  4. */
  5.  
  6. #include <sys/types.h>
  7. #include "pdftw.h"
  8.  
  9. #ifdef    RCSID
  10. static char RCS[] = "$Header: /proj/wais/wais-8-b2/lib/RCS/alphasort.c,v 1.1 91/07/17 16:37:56 jonathan Exp $";
  11. #endif    /* RCSID */
  12.  
  13. int
  14. alphasort(d1, d2)
  15.     struct dirent **d1;
  16.     struct dirent **d2;
  17. {
  18.     return strcmp(d1[0]->d_name, d2[0]->d_name);
  19. }
  20.